import request from "@/views/utils/request";
//20.获取商品列表
export const list = (data)=>{
  return  request.get('/goods/list',{params:data})
}
//21.删除商品
export const del = (data)=>{
  return  request.get('/goods/del',{params:data})
}
///goods/edit
export const edit = (data) => {
  return request.post("/goods/edit",data)
}
//19.添加商品
export const add = (data) => {
  return request.post("/goods/add",data)
}
//18.商品图片上传接口（特殊功能）
export const goods_img_upload = (data) => {
  return request.post("/goods/goods_img_upload",data)
}
//14.获取分类
export const catelist = (data) => {
  return  request.get('/goods/catelist',{params:data})
}
//14.删除分类
export const delcate = (data) => {
  return  request.get('/goods/delcate',{params:data})
}
//16.修改分类
export const editcate = (data) => {
  return request.post("/goods/editcate",data)
}
//13.添加分类
export const addcate = (data) => {
  return request.post("/goods/addcate",data)
}
//17.查询所有分类名称
export const categories = (data) => {
  return  request.get('/goods/categories',{params:data})
}